import { createStore, applyMiddleware } from '../my-redux' //applyMiddleware
import reducers from './reducers'
import logger from './logger'
import promise from './promise'
import thunk from './thunk'


const store = applyMiddleware(promise, thunk, logger)(createStore)(reducers)



// let store = createStore(reducers);

// store.dispatch = function (action) {
//     console.log('pre dispatch')
//     store.dispatch(action)
//     console.log('next dispatch')
// }




export default store